package com.hspedu.abstract_.TemplateExercise;

public abstract class Template {
    public void calculate(){
        long start = System.currentTimeMillis();//开始时间
        code();//动态机制绑定
        long end = System.currentTimeMillis();//结束时间
        System.out.println("耗时:" + (end-start) );
    }

    public abstract void code();
}
